package com.itzyf.pokemondata.bean;

import org.litepal.crud.LitePalSupport;

import java.util.Date;

/**
 * @author 依风听雨
 * @version 创建时间：2019/01/23 14:19
 */
public class DbPokemon extends LitePalSupport {

    private Date createdAt;
    private String exclusiveId;
    private int hp;
    private String objectId;
    private int pa;
    private int pd;
    private String pokemonName;
    private int sa;
    private int sd;
    private String skin;
    private int speed;
    private Date updatedAt;
    private long id;
    private String property;
    private boolean isStar;
    private boolean isLevel;
    private String red1;
    private String img;

    public String getSt2() {
        return st2;
    }

    public void setSt2(String st2) {
        this.st2 = st2;
    }

    private String st2;
    private String skinImg;
    /**
     * 特训
     */
    private String specialTraining;
    private double discount;

    public DbPokemon() {

    }

    public DbPokemon(PokemonJsonDo jsonDo) {
        this.createdAt = jsonDo.getCreatedAt();
        if (jsonDo.getExclusive() != null) {
            this.exclusiveId = jsonDo.getExclusive().getObjectId();
        }
        this.hp = jsonDo.getHp();
        this.objectId = jsonDo.getObjectId();
        this.pa = jsonDo.getPa();
        this.pd = jsonDo.getPd();
        this.pokemonName = jsonDo.getPokemonName();
        this.sa = jsonDo.getSa();
        this.sd = jsonDo.getSd();
        this.skin = jsonDo.getSkin();
        this.speed = jsonDo.getSpeed();
        this.updatedAt = jsonDo.getUpdatedAt();
        this.property = jsonDo.getProperty();
        this.specialTraining = jsonDo.getSpecialTraining();
        this.st2 = jsonDo.getSt2();
        if (jsonDo.getDiscount() == 0.0) {
            this.discount = 10.0;
        } else {
            this.discount = jsonDo.getDiscount();
        }
        this.isLevel = jsonDo.isLevel();
        this.red1 = jsonDo.getRed1();
        this.img = jsonDo.getImg();
        this.skinImg=jsonDo.getSkinImg();
    }

    public DbPokemon(Date createdAt, String exclusiveId, int hp, String objectId, int pa, int pd,
                     String pokemonName, int sa, int sd, String skin, int speed, Date updatedAt) {
        this.createdAt = createdAt;
        this.exclusiveId = exclusiveId;
        this.hp = hp;
        this.objectId = objectId;
        this.pa = pa;
        this.pd = pd;
        this.pokemonName = pokemonName;
        this.sa = sa;
        this.sd = sd;
        this.skin = skin;
        this.speed = speed;
        this.updatedAt = updatedAt;
    }

    public double getDiscount() {
        return discount;
    }

    public void setDiscount(double discount) {
        this.discount = discount;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public String getExclusiveId() {
        return exclusiveId == null ? "" : exclusiveId;
    }

    public void setExclusiveId(String exclusiveId) {
        this.exclusiveId = exclusiveId;
    }

    public int getHp() {
        return hp;
    }

    public void setHp(int hp) {
        this.hp = hp;
    }

    public String getObjectId() {
        return objectId == null ? "" : objectId;
    }

    public void setObjectId(String objectId) {
        this.objectId = objectId;
    }

    public int getPa() {
        return pa;
    }

    public void setPa(int pa) {
        this.pa = pa;
    }

    public int getPd() {
        return pd;
    }

    public void setPd(int pd) {
        this.pd = pd;
    }

    public String getPokemonName() {
        return pokemonName == null ? "" : pokemonName;
    }

    public void setPokemonName(String pokemonName) {
        this.pokemonName = pokemonName;
    }

    public int getSa() {
        return sa;
    }

    public void setSa(int sa) {
        this.sa = sa;
    }

    public int getSd() {
        return sd;
    }

    public void setSd(int sd) {
        this.sd = sd;
    }

    public String getSkin() {
        return skin == null ? "" : skin;
    }

    public void setSkin(String skin) {
        this.skin = skin;
    }

    public int getSpeed() {
        return speed;
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }

    public Date getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getProperty() {
        return property == null ? "" : property;
    }

    public void setProperty(String property) {
        this.property = property;
    }

    public String getSpecialTraining() {
        return specialTraining;
    }

    public void setSpecialTraining(String specialTraining) {
        this.specialTraining = specialTraining;
    }

    public boolean isStar() {
        return isStar;
    }

    public void setStar(boolean star) {
        isStar = star;
    }

    public boolean isLevel() {
        return isLevel;
    }

    public void setLevel(boolean level) {
        isLevel = level;
    }

    public String getRed1() {
        return red1 == null ? "" : red1;
    }

    public void setRed1(String red1) {
        this.red1 = red1;
    }

    public String getImg() {
        return img == null ? "" : img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public String getSkinImg() {
        return skinImg == null ? "" : skinImg;
    }

    public void setSkinImg(String skinImg) {
        this.skinImg = skinImg;
    }
}
